package com.hyfrogx.common.param;


import io.swagger.models.auth.In;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @version 1.0.0
 * @Author: lfh
 * @Date: 2019/10/16 17:28
 * @Company 汉咏科技
 */

public class Ad {

    public enum AdType{
        BANNER("轮播图",0),
        ZOUMADENG("走马灯",1),
        SUJI_GANGGAO("随机广告",2);

        private String msg;
        private Integer code;

        private AdType(String msg, Integer code)
        {
            this.msg = msg;
            this.code = code;
        }
        public String getMsg() {
            return msg;
        }

        public Integer getCode() {
            return code;
        }
        public static Map getCollection()
        {
            Map map = new LinkedHashMap();
            for (AdType a:AdType.values())
            {
                map.put(a.getMsg(),a.getCode());
            }
            return map;
        }
        public static Integer getcodeBymsg(String msg)
        {
            Integer code = null;
            for (AdType a:AdType.values())
            {
                if (a.getMsg().equals(msg)) {
                   code = a.getCode();
                   break;
                }
            }
            return code;
        }
    }
    public enum ModelType{
        SHOUTYE_SPY("首页_闪屏页",0),
        ZIXUN_SHOUYE_UP("资讯_首页_上",1),
        ZIXUN_SHOUYE_DOWN("资讯_首页_下",2),
        KECHENG("课程",3),
        HUIYI("会议",4),
        ZHIBO("直播",5);

        private String msg;
        private Integer code;
        private ModelType(String msg,Integer code)
        {
            this.msg = msg;
            this.code = code;
        }
        public String getMsg() {
            return msg;
        }

        public Integer getCode() {
            return code;
        }
        public static Map getCollection()
        {
            Map map = new LinkedHashMap();
            for (ModelType a:ModelType.values())
            {
                map.put(a.getMsg(),a.getCode());
            }
            return map;
        }
    }
    public enum JumpType{
        ZIXUN("资讯",0),
        ZHIBO("直播",1),
        HUIYI("会议",2),
        KECHENG("课程",3),
        LIANJIE("链接",4),
        XIAOSHIPIN("小视频",5),
        GOUMAITEQUAN("购买特权",6),
        CHONGZHI("充值",7);

        private String msg;
        private Integer code;
        private JumpType(String msg,Integer code)
        {
            this.msg = msg;
            this.code = code;
        }
        public String getMsg() {
            return msg;
        }

        public Integer getCode() {
            return code;
        }
        public static Map getCollection()
        {
            Map map = new LinkedHashMap();
            for (JumpType a:JumpType.values())
            {
                map.put(a.getMsg(),a.getCode());
            }
            return map;
        }
    }

}
